<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="handleClick">按钮{{msg}}</button>
    </div>
    <div id="app2">
        <button @click="handleClick">按钮2{{msg}}</button>
    </div>
    <script src="../vue.js"></script>
    <script>
        //全局mixin
        Vue.mixin({
            data () {
                return {
                    msg:'2',
                }
            },
            methods: {
                handleClick(){
                    console.log('1');
                }
            },
        })
        new Vue({
            el:'#app',
        });
        new Vue({}).$mount('#app2');
    </script>
</body>
</html>